package st.business.tepth.manager;

import java.util.List;

import st.business.tepth.business.bean.OperationBean;
import st.business.tepth.business.bean.PartLocationBean;

/**
 * @author zhangyu
 * @date 2019/3/19
 */
public class GlobalDataManager {
    private List<OperationBean> mOperationBeans;
    private List<PartLocationBean> mPartLocationBeans;

    private GlobalDataManager() {
    }

    private static final class Holder {
        private static final GlobalDataManager INSTANCE = new GlobalDataManager();
    }

    public static GlobalDataManager getInstance() {
        return Holder.INSTANCE;
    }

    public List<OperationBean> getOperationBeans() {
        if (mOperationBeans != null) {
            for (OperationBean operationBean : mOperationBeans) {
                operationBean.setSelected(false);
            }
        }
        return mOperationBeans;
    }

    public void setOperationBeans(List<OperationBean> operationBeans) {
        mOperationBeans = operationBeans;
    }

    public List<PartLocationBean> getPartLocationBeans() {
        if (mPartLocationBeans != null) {
            for (PartLocationBean locationBean : mPartLocationBeans) {
                locationBean.setSelected(false);
            }
        }
        return mPartLocationBeans;
    }

    public void setPartLocationBeans(List<PartLocationBean> partLocationBeans) {
        mPartLocationBeans = partLocationBeans;
    }
}
